package com.tomicalab.mobiletoken.ckca.utils;

import android.content.Context;
import android.content.SharedPreferences;

public class StorePreferences {
	public static String PREFS_ACCOUNT = "RemoteUnblock";
	public static String PREFS_RENEW = "Renew";
	public static String RANDOMCODE = "RN";
	private Context context;
	public StorePreferences(Context context)
	{
		this.context = context;
	}
	
	public void setRN(String RN)
	{
		SharedPreferences settings = context.getSharedPreferences(PREFS_ACCOUNT, 0);
		SharedPreferences.Editor editor = settings.edit();
		editor.putString(RANDOMCODE, RN);
		editor.commit();
	}
	
	public String getRN()
	{
		SharedPreferences prefs = context.getSharedPreferences(PREFS_ACCOUNT, 0);
	    String rn = prefs.getString(RANDOMCODE, null);
		return rn;
	}
	
	public void setStatusRenew(String status)
	{
		SharedPreferences settings = context.getSharedPreferences("Renew", 0);
		SharedPreferences.Editor editor = settings.edit();
		editor.putString("Renew_status", status);
		editor.commit();
	}
	
	public String getStatusRenew()
	{
		SharedPreferences prefs = context.getSharedPreferences("Renew", 0);
	    String status = prefs.getString("Renew_status", null);
		return status;
	}
}
